package com.wkbb.common.enums;

/**
 * @author liuxiancan
 * 创建时间：2020-08-10 11:12
 */
public enum MiniAppEnum {

    MAIN_MINI_APP(0,"主小程序"),
    VISIT_MINI_APP(1,"访客小程序"),
    SPORTS_MINI_APP(2,"体育小程序");

    private Integer code;
    private String desc;

    MiniAppEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    // 普通方法
    public static String getDesc(short code) {
        for (MiniAppEnum c : MiniAppEnum.values()) {
            if (c.getCode() == code) {
                return c.desc;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
